package com.demo.launcher;

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

/**
 * @author : Zach
 * @desc :
 * @date : 2021/11/9 17:00
 */
public class TargetFragmentActivity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_target_fragment);

        int type = getIntent().getIntExtra("type", 0);
        if (type == 0) {
            getSupportFragmentManager()
                    .beginTransaction()
                    .add(R.id.fragment_container, new TargetFragmentX())
                    .commit();
        } else {
            getFragmentManager()
                    .beginTransaction()
                    .add(R.id.fragment_container, new TargetFragment())
                    .commit();
        }

    }

}
